package com.bawei.model_sevent.Activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.View;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.app.ActivityOptionsCompat;

import com.alibaba.android.arouter.launcher.ARouter;
import com.bawei.model_sevent.Activity.Activity.MainActivity_main;
import com.bawei.model_sevent.R;

import java.util.Timer;
import java.util.TimerTask;

public class MainActivity extends AppCompatActivity {
    private int index=2;
    private Handler handler=new Handler()
    {
        @Override
        public void handleMessage(@NonNull Message msg) {
           if (index<0)
           {
               ARouter.getInstance().build("/app/show_main").navigation();
               finish();
           }else 
           {
               handler.sendEmptyMessageDelayed(1000,1000);
               index--;
           }
        }
    };
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        handler.sendEmptyMessageDelayed(1000,1000);
        
    }
}